import React, { Component } from 'react';

export default class SlideInTr extends Component {
	componentDidMount(){
		let trs=[].slice.call(document.querySelectorAll('table .table-content'));
		if (trs.length) {
			trs.forEach(tr=>{
				tr.style.display='table-row';
				setTimeout(()=>{
				tr.style.transition= 'all .3s ease-out';
				tr.className='table-in';
				},200);
			});
		}
	}
	render(){
		return (
			<tr {...this.props} className={this.props.item.newData?'table-content':''}>{ this.props.children }</tr>
		);
	}
} 